
 
 int leftValue = 0;
 int rightValue = 0;

void setup() {
  Serial.begin(9600);
  pinMode(A0, INPUT);
  pinMode(A1, INPUT);
}

void loop() {
  leftValue = digitalRead(A0);
  rightValue = digitalRead(A1);
  Serial.print("Left Sensor: ");
  Serial.print(leftValue);
  Serial.print("\t");
  Serial.print("Right Sensor: ");
  Serial.print(rightValue);
  Serial.print("\t");
  if(leftValue == rightValue)
    Serial.println("Driving straight");
  else if(leftValue > rightValue)
    Serial.println("Turning left");
  else if(leftValue < rightValue)
    Serial.println("Turning right");
  delay(200);
}
